var testConfig = require('../testConfig');
function TestProject() {
  this.init = function () {
    var arr = [];
    arr.push(
      this.step1,
      this.step2,
      this.step3,
      this.step4,
      this.step5,
       this.step6
    );
    testConfig.testFun.runStep(arr);
  };
  this.step1 = function () {
    testConfig.testFun.as().find("#id-projectDown").html("<option value='PC54415VP7OI'>厉炳测试的</option>");
    testConfig.testFun.as().find("#id-enter").addClass("active");
  };
  this.step2 = function () {
    testConfig.testFun.as().find("#id-enter").prop("disabled", false)[0].click();
  };
  this.step3 = function () {
    testConfig.testFun.as().find("#id-materialsReceipt").click();
  };
  this.step4 = function () {
    testConfig.testFun.bs().find("#id-oddNumbers").focus(function () {
      $(this).val("FH20170814099162");
    }).blur();
  };
  this.step5 = function () {
    var deliveryQuantity = testConfig.testFun.bs().find("span[data-name='deliveryQuantity']").html();
    testConfig.testFun.bs().find("input[data-name]='quantity'").val(deliveryQuantity);
  };
  this.step6 = function () {
    testConfig.testFun.bs().find("#id-hasOrder").click();
  };
}
function testStart() {
  var test = new TestProject();
  test.init();
}
exports.start = testStart;
